Exploratory Data Analytics on Netflix Data¶

Load the Packages and Data¶

In [139]:
import pandas as pd                # for dataframe and manipulation
import numpy as np                 # for numerical computing
import seaborn as sns              # for graphs and data visualization
import matplotlib.pyplot as plt
import plotly.graph_objects as go
In [2]:
netflix = pd.read_csv(r"C:\Users\tiwbrahm\Downloads\netflix.csv")
In [3]:
netflix.head(2)
Out[3]:
show_id type title director cast country date_added release_year rating duration listed_in description
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson NaN United States September 25, 2021 2020 PG-13 90 min Documentaries As her father nears the end of his life, filmm...
1 s2 TV Show Blood & Water NaN Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 Seasons International TV Shows, TV Dramas, TV Mysteries After crossing paths at a party, a Cape Town t...
In [4]:
netflix.tail(2)
Out[4]:
show_id type title director cast country date_added release_year rating duration listed_in description
8805 s8806 Movie Zoom Peter Hewitt Tim Allen, Courteney Cox, Chevy Chase, Kate Ma... United States January 11, 2020 2006 PG 88 min Children & Family Movies, Comedies Dragged from civilian life, a former superhero...
8806 s8807 Movie Zubaan Mozez Singh Vicky Kaushal, Sarah-Jane Dias, Raaghav Chanan... India March 2, 2019 2015 TV-14 111 min Dramas, International Movies, Music & Musicals A scrappy but poor boy worms his way into a ty...
In [5]:
netflix.shape
Out[5]:
(8807, 12)
In [6]:
netflix.size
Out[6]:
105684
In [7]:
netflix.columns
Out[7]:
Index(['show_id', 'type', 'title', 'director', 'cast', 'country', 'date_added',
       'release_year', 'rating', 'duration', 'listed_in', 'description'],
      dtype='object')
In [8]:
netflix.dtypes
Out[8]:
show_id         object
type            object
title           object
director        object
cast            object
country         object
date_added      object
release_year     int64
rating          object
duration        object
listed_in       object
description     object
dtype: object
In [9]:
netflix.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 8807 entries, 0 to 8806
Data columns (total 12 columns):
 #   Column        Non-Null Count  Dtype 
---  ------        --------------  ----- 
 0   show_id       8807 non-null   object
 1   type          8807 non-null   object
 2   title         8807 non-null   object
 3   director      6173 non-null   object
 4   cast          7982 non-null   object
 5   country       7976 non-null   object
 6   date_added    8797 non-null   object
 7   release_year  8807 non-null   int64 
 8   rating        8803 non-null   object
 9   duration      8804 non-null   object
 10  listed_in     8807 non-null   object
 11  description   8807 non-null   object
dtypes: int64(1), object(11)
memory usage: 825.8+ KB
In [10]:
netflix.describe()
Out[10]:
release_year
count 8807.000000
mean 2014.180198
std 8.819312
min 1925.000000
25% 2013.000000
50% 2017.000000
75% 2019.000000
max 2021.000000
In [11]:
netflix.describe(include='all')
Out[11]:
show_id type title director cast country date_added release_year rating duration listed_in description
count 8807 8807 8807 6173 7982 7976 8797 8807.000000 8803 8804 8807 8807
unique 8807 2 8807 4528 7692 748 1767 NaN 17 220 514 8775
top s1 Movie Dick Johnson Is Dead Rajiv Chilaka David Attenborough United States January 1, 2020 NaN TV-MA 1 Season Dramas, International Movies Paranormal activity at a lush, abandoned prope...
freq 1 6131 1 19 19 2818 109 NaN 3207 1793 362 4
mean NaN NaN NaN NaN NaN NaN NaN 2014.180198 NaN NaN NaN NaN
std NaN NaN NaN NaN NaN NaN NaN 8.819312 NaN NaN NaN NaN
min NaN NaN NaN NaN NaN NaN NaN 1925.000000 NaN NaN NaN NaN
25% NaN NaN NaN NaN NaN NaN NaN 2013.000000 NaN NaN NaN NaN
50% NaN NaN NaN NaN NaN NaN NaN 2017.000000 NaN NaN NaN NaN
75% NaN NaN NaN NaN NaN NaN NaN 2019.000000 NaN NaN NaN NaN
max NaN NaN NaN NaN NaN NaN NaN 2021.000000 NaN NaN NaN NaN
In [12]:
netflix.nunique()
Out[12]:
show_id         8807
type               2
title           8807
director        4528
cast            7692
country          748
date_added      1767
release_year      74
rating            17
duration         220
listed_in        514
description     8775
dtype: int64

Data Cleaning (Handling missing & duplicate values)¶

In [13]:
# Find Missing Values
netflix.isnull()
Out[13]:
show_id type title director cast country date_added release_year rating duration listed_in description
0 False False False False True False False False False False False False
1 False False False True False False False False False False False False
2 False False False False False True False False False False False False
3 False False False True True True False False False False False False
4 False False False True False False False False False False False False
... ... ... ... ... ... ... ... ... ... ... ... ...
8802 False False False False False False False False False False False False
8803 False False False True True True False False False False False False
8804 False False False False False False False False False False False False
8805 False False False False False False False False False False False False
8806 False False False False False False False False False False False False

8807 rows × 12 columns

In [14]:
missing = netflix.isnull().sum()  # Missing values
missing
Out[14]:
show_id            0
type               0
title              0
director        2634
cast             825
country          831
date_added        10
release_year       0
rating             4
duration           3
listed_in          0
description        0
dtype: int64
In [15]:
missing1 = (netflix.isnull().sum()/len(netflix)*100)  # Missing values in %
missing1
Out[15]:
show_id          0.000000
type             0.000000
title            0.000000
director        29.908028
cast             9.367549
country          9.435676
date_added       0.113546
release_year     0.000000
rating           0.045418
duration         0.034064
listed_in        0.000000
description      0.000000
dtype: float64
In [16]:
# Missing Total with %
Missed = pd.concat([missing,missing1],axis=1,keys=['Total','Missing%'])
Missed
Out[16]:
Total Missing%
show_id 0 0.000000
type 0 0.000000
title 0 0.000000
director 2634 29.908028
cast 825 9.367549
country 831 9.435676
date_added 10 0.113546
release_year 0 0.000000
rating 4 0.045418
duration 3 0.034064
listed_in 0 0.000000
description 0 0.000000
In [17]:
# Heatmap to describe Null data in Netflix dataset
sns.heatmap(netflix.isnull())
plt.xticks(rotation=90)
Out[17]:
(array([ 0.5,  1.5,  2.5,  3.5,  4.5,  5.5,  6.5,  7.5,  8.5,  9.5, 10.5,
        11.5]),
 [Text(0.5, 0, 'show_id'),
  Text(1.5, 0, 'type'),
  Text(2.5, 0, 'title'),
  Text(3.5, 0, 'director'),
  Text(4.5, 0, 'cast'),
  Text(5.5, 0, 'country'),
  Text(6.5, 0, 'date_added'),
  Text(7.5, 0, 'release_year'),
  Text(8.5, 0, 'rating'),
  Text(9.5, 0, 'duration'),
  Text(10.5, 0, 'listed_in'),
  Text(11.5, 0, 'description')])
  • From the above output we can see that director,cast & country columns contains maximum null values.
  • Filling missing (Null) values for director,cast & country as "Unknown" for the missing directors.
In [18]:
# making copy of dataset for changes
netflix_copy = netflix.copy()
netflix_copy.head(2)
Out[18]:
show_id type title director cast country date_added release_year rating duration listed_in description
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson NaN United States September 25, 2021 2020 PG-13 90 min Documentaries As her father nears the end of his life, filmm...
1 s2 TV Show Blood & Water NaN Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 Seasons International TV Shows, TV Dramas, TV Mysteries After crossing paths at a party, a Cape Town t...
In [19]:
netflix_copy['director']
Out[19]:
0       Kirsten Johnson
1                   NaN
2       Julien Leclercq
3                   NaN
4                   NaN
             ...       
8802      David Fincher
8803                NaN
8804    Ruben Fleischer
8805       Peter Hewitt
8806        Mozez Singh
Name: director, Length: 8807, dtype: object
In [20]:
netflix_copy['director'].fillna('Unknown',inplace=True)
In [21]:
netflix_copy['cast']
Out[21]:
0                                                     NaN
1       Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban...
2       Sami Bouajila, Tracy Gotoas, Samuel Jouy, Nabi...
3                                                     NaN
4       Mayur More, Jitendra Kumar, Ranjan Raj, Alam K...
                              ...                        
8802    Mark Ruffalo, Jake Gyllenhaal, Robert Downey J...
8803                                                  NaN
8804    Jesse Eisenberg, Woody Harrelson, Emma Stone, ...
8805    Tim Allen, Courteney Cox, Chevy Chase, Kate Ma...
8806    Vicky Kaushal, Sarah-Jane Dias, Raaghav Chanan...
Name: cast, Length: 8807, dtype: object
In [22]:
netflix_copy['cast'].fillna('Unknown',inplace=True)
In [23]:
netflix_copy['country']
Out[23]:
0       United States
1        South Africa
2                 NaN
3                 NaN
4               India
            ...      
8802    United States
8803              NaN
8804    United States
8805    United States
8806            India
Name: country, Length: 8807, dtype: object
In [122]:
netflix_copy['country'].fillna('Unknown',inplace=True)
In [123]:
netflix_copy.head(2)
Out[123]:
show_id type title director cast country date_added release_year rating duration description Genre 1 Genre 2 Genre 3 month_added month_name_added year_added release_after_years
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson Unknown United States 2021-09-25 2020 PG-13 90 min As her father nears the end of his life, filmm... Documentaries NaN NaN 9 September 2021 1
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa 2021-09-24 2021 TV-MA 2 Seasons After crossing paths at a party, a Cape Town t... International TV Shows TV Dramas TV Mysteries 9 September 2021 0
  • There are 3 more fields with missing values ('date_added', 'rating', 'duration').
  • Since the we have missing values less than 1%, we can remove these records for the analysis.
In [25]:
netflix_copy.dropna(subset=['date_added','rating','duration'], inplace=True)
In [26]:
netflix_copy.head()
Out[26]:
show_id type title director cast country date_added release_year rating duration listed_in description
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson Unknown United States September 25, 2021 2020 PG-13 90 min Documentaries As her father nears the end of his life, filmm...
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 Seasons International TV Shows, TV Dramas, TV Mysteries After crossing paths at a party, a Cape Town t...
2 s3 TV Show Ganglands Julien Leclercq Sami Bouajila, Tracy Gotoas, Samuel Jouy, Nabi... Unknown September 24, 2021 2021 TV-MA 1 Season Crime TV Shows, International TV Shows, TV Act... To protect his family from a powerful drug lor...
3 s4 TV Show Jailbirds New Orleans Unknown Unknown Unknown September 24, 2021 2021 TV-MA 1 Season Docuseries, Reality TV Feuds, flirtations and toilet talk go down amo...
4 s5 TV Show Kota Factory Unknown Mayur More, Jitendra Kumar, Ranjan Raj, Alam K... India September 24, 2021 2021 TV-MA 2 Seasons International TV Shows, Romantic TV Shows, TV ... In a city of coaching centers known to train I...
In [27]:
# Handling with duplicate rows
In [28]:
netflix_copy[netflix_copy.duplicated()]    # To show duplicate rows
Out[28]:
show_id type title director cast country date_added release_year rating duration listed_in description
In [29]:
netflix_copy.duplicated().sum()   # Count of duplicate rows
Out[29]:
0
  • No duplicate rows are present in this dataset.
In [30]:
netflix_copy.shape   # Size after cleaning
Out[30]:
(8790, 12)

Exploratory Data Analysis¶

In [31]:
netflix_copy.type.unique()
Out[31]:
array(['Movie', 'TV Show'], dtype=object)
  • We can see that netflix have 69% movies while 30% TV Shows
In [131]:
netflix_movies = netflix_copy[netflix_copy['type'] == 'Movie'].copy()
netflix_shows = netflix_copy[netflix_copy['type'] == 'TV Show'].copy()
In [132]:
netflix_movies.head(2)
Out[132]:
show_id type title director cast country date_added release_year rating duration description Genre 1 Genre 2 Genre 3 month_added month_name_added year_added release_after_years
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson Unknown United States 2021-09-25 2020 PG-13 90 min As her father nears the end of his life, filmm... Documentaries NaN NaN 9 September 2021 1
6 s7 Movie My Little Pony: A New Generation Robert Cullen, José Luis Ucha Vanessa Hudgens, Kimiko Glenn, James Marsden, ... Unknown 2021-09-24 2021 PG 91 min Equestria's divided. But a bright-eyed hero be... Children & Family Movies NaN NaN 9 September 2021 0
In [38]:
netflix_shows.head(2)
Out[38]:
show_id type title director cast country date_added release_year rating duration listed_in description
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 Seasons International TV Shows, TV Dramas, TV Mysteries After crossing paths at a party, a Cape Town t...
2 s3 TV Show Ganglands Julien Leclercq Sami Bouajila, Tracy Gotoas, Samuel Jouy, Nabi... Unknown September 24, 2021 2021 TV-MA 1 Season Crime TV Shows, International TV Shows, TV Act... To protect his family from a powerful drug lor...

Clean duration field in movies dataframe¶

In [39]:
netflix_movies['duration'] = netflix_movies.duration.str.replace(' min','').astype(int)
In [40]:
netflix_shows.rename(columns={'duration':'season'},inplace=True)
In [41]:
netflix_shows.head(5)
Out[41]:
show_id type title director cast country date_added release_year rating season listed_in description
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 Seasons International TV Shows, TV Dramas, TV Mysteries After crossing paths at a party, a Cape Town t...
2 s3 TV Show Ganglands Julien Leclercq Sami Bouajila, Tracy Gotoas, Samuel Jouy, Nabi... Unknown September 24, 2021 2021 TV-MA 1 Season Crime TV Shows, International TV Shows, TV Act... To protect his family from a powerful drug lor...
3 s4 TV Show Jailbirds New Orleans Unknown Unknown Unknown September 24, 2021 2021 TV-MA 1 Season Docuseries, Reality TV Feuds, flirtations and toilet talk go down amo...
4 s5 TV Show Kota Factory Unknown Mayur More, Jitendra Kumar, Ranjan Raj, Alam K... India September 24, 2021 2021 TV-MA 2 Seasons International TV Shows, Romantic TV Shows, TV ... In a city of coaching centers known to train I...
5 s6 TV Show Midnight Mass Mike Flanagan Kate Siegel, Zach Gilford, Hamish Linklater, H... Unknown September 24, 2021 2021 TV-MA 1 Season TV Dramas, TV Horror, TV Mysteries The arrival of a charismatic young priest brin...
In [42]:
netflix_shows["season"] = netflix_shows.season.str.replace(" Seasons",'')
netflix_shows["season"] = netflix_shows.season.str.replace(" Season",'').astype(int)
In [43]:
netflix_shows.head()
Out[43]:
show_id type title director cast country date_added release_year rating season listed_in description
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 International TV Shows, TV Dramas, TV Mysteries After crossing paths at a party, a Cape Town t...
2 s3 TV Show Ganglands Julien Leclercq Sami Bouajila, Tracy Gotoas, Samuel Jouy, Nabi... Unknown September 24, 2021 2021 TV-MA 1 Crime TV Shows, International TV Shows, TV Act... To protect his family from a powerful drug lor...
3 s4 TV Show Jailbirds New Orleans Unknown Unknown Unknown September 24, 2021 2021 TV-MA 1 Docuseries, Reality TV Feuds, flirtations and toilet talk go down amo...
4 s5 TV Show Kota Factory Unknown Mayur More, Jitendra Kumar, Ranjan Raj, Alam K... India September 24, 2021 2021 TV-MA 2 International TV Shows, Romantic TV Shows, TV ... In a city of coaching centers known to train I...
5 s6 TV Show Midnight Mass Mike Flanagan Kate Siegel, Zach Gilford, Hamish Linklater, H... Unknown September 24, 2021 2021 TV-MA 1 TV Dramas, TV Horror, TV Mysteries The arrival of a charismatic young priest brin...

1. Ratings of Movies and Seasons¶

In [44]:
netflix_copy.rating.unique()
Out[44]:
array(['PG-13', 'TV-MA', 'PG', 'TV-14', 'TV-PG', 'TV-Y', 'TV-Y7', 'R',
       'TV-G', 'G', 'NC-17', 'NR', 'TV-Y7-FV', 'UR'], dtype=object)
In [45]:
plt.figure(figsize=(15,7))
sns.countplot(netflix_copy,x=netflix_copy['rating'],hue=netflix_copy['type'])
plt.show()

Observation :

  • Maximum count of ratings included TV-MA (Mature Audiences) and TV-14 (Parents strongly cautioned) for both Movies and TV shows
  • 17 types of ratings on netflix

2. Movies and TV shows released in every years¶

In [46]:
#No. of movies released every year
netflix_copy.groupby(['release_year'])['release_year'].count().sort_values(ascending=False)
Out[46]:
release_year
2018    1146
2019    1030
2017    1030
2020     953
2016     901
        ... 
1959       1
1961       1
1947       1
1966       1
1925       1
Name: release_year, Length: 74, dtype: int64
In [130]:
plt.figure(figsize=(35,12))
sns.countplot(netflix_copy,x = netflix_copy.release_year,hue=netflix_copy.type)
plt.xticks(rotation=90)
plt.show()

Observation:

  • Netflix touched its peak for making movies in 2018 and TV shows in 2020
  • From the above we can see that with passing years more movies are being made year by year
  • The above data shows that there is a sudden increase in the creation of movies in year 2016 as compared to year 2015

3. Most watched shows on the Netflix?¶

In [53]:
netflix_copy.type.value_counts().to_frame('Value_count')
Out[53]:
Value_count
type
Movie 6126
TV Show 2664
In [54]:
sns.countplot(x=netflix_copy['type'])
plt.xticks(rotation=90)
Out[54]:
(array([0, 1]), [Text(0, 0, 'Movie'), Text(1, 0, 'TV Show')])
In [55]:
# Pie chart to show value in % for most watched
type_show = ['Movie','TV Show']
Value_count = [6126,2663]
plt.pie(Value_count,labels=type_show,autopct="%2.2f%%")
plt.legend(title='Most watched shows on the Netflix')
Out[55]:
<matplotlib.legend.Legend at 0x1700d5e8130>
  • Observation : Audience likes to watched mostly movies(69.70% ) over TV shows(30.30%)

4 Which has the highest rating Tv show or Movies?¶

In [56]:
netflix_copy.head(2)
Out[56]:
show_id type title director cast country date_added release_year rating duration listed_in description
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson Unknown United States September 25, 2021 2020 PG-13 90 min Documentaries As her father nears the end of his life, filmm...
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 Seasons International TV Shows, TV Dramas, TV Mysteries After crossing paths at a party, a Cape Town t...
In [57]:
netflix.groupby("type")["rating"].agg(pd.Series.mode)
Out[57]:
type
Movie      TV-MA
TV Show    TV-MA
Name: rating, dtype: object
In [58]:
new_genre = netflix_copy['listed_in'].str.split(",",n = 2)
new_genre
Out[58]:
0                                         [Documentaries]
1       [International TV Shows,  TV Dramas,  TV Myste...
2       [Crime TV Shows,  International TV Shows,  TV ...
3                               [Docuseries,  Reality TV]
4       [International TV Shows,  Romantic TV Shows,  ...
                              ...                        
8802                   [Cult Movies,  Dramas,  Thrillers]
8803           [Kids' TV,  Korean TV Shows,  TV Comedies]
8804                           [Comedies,  Horror Movies]
8805                [Children & Family Movies,  Comedies]
8806    [Dramas,  International Movies,  Music & Music...
Name: listed_in, Length: 8790, dtype: object
In [59]:
netflix_copy['Genre 1'] = new_genre.str.get(0)
netflix_copy['Genre 2'] = new_genre.str.get(1)
netflix_copy['Genre 3'] = new_genre.str.get(2)
netflix_copy.head(2)
Out[59]:
show_id type title director cast country date_added release_year rating duration listed_in description Genre 1 Genre 2 Genre 3
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson Unknown United States September 25, 2021 2020 PG-13 90 min Documentaries As her father nears the end of his life, filmm... Documentaries NaN NaN
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 Seasons International TV Shows, TV Dramas, TV Mysteries After crossing paths at a party, a Cape Town t... International TV Shows TV Dramas TV Mysteries
In [60]:
netflix_copy['Genre 1'].describe(include=all)
Out[60]:
count       8790
unique        36
top       Dramas
freq        1599
Name: Genre 1, dtype: object
In [61]:
netflix_copy['Genre 2'].describe(include=all)
Out[61]:
count                      6778
unique                       37
top        International Movies
freq                       1722
Name: Genre 2, dtype: object
In [62]:
netflix_copy['Genre 3'].describe(include=all)
Out[62]:
count                      3726
unique                       33
top        International Movies
freq                        902
Name: Genre 3, dtype: object
In [63]:
netflix_copy.drop('listed_in',axis = 1,inplace = True)
netflix_copy.head(2)
Out[63]:
show_id type title director cast country date_added release_year rating duration description Genre 1 Genre 2 Genre 3
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson Unknown United States September 25, 2021 2020 PG-13 90 min As her father nears the end of his life, filmm... Documentaries NaN NaN
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 Seasons After crossing paths at a party, a Cape Town t... International TV Shows TV Dramas TV Mysteries
In [64]:
netflix_copy.duplicated().sum()
Out[64]:
0
In [65]:
netflix_copy.groupby(['Genre 1'])['release_year'].count().sort_values(ascending = False)
Out[65]:
Genre 1
Dramas                          1599
Comedies                        1210
Action & Adventure               859
Documentaries                    829
International TV Shows           773
Children & Family Movies         605
Crime TV Shows                   399
Kids' TV                         385
Stand-Up Comedy                  334
Horror Movies                    275
British TV Shows                 252
Docuseries                       220
Anime Series                     174
International Movies             128
Reality TV                       120
TV Comedies                      119
Classic Movies                    80
TV Dramas                         67
Thrillers                         65
Movies                            53
TV Action & Adventure             39
Stand-Up Comedy & Talk Shows      34
Romantic TV Shows                 32
Anime Features                    21
Classic & Cult TV                 20
Independent Movies                20
Music & Musicals                  18
TV Shows                          16
Sci-Fi & Fantasy                  13
Cult Movies                       12
TV Horror                         11
Romantic Movies                    3
Spanish-Language TV Shows          2
Sports Movies                      1
TV Sci-Fi & Fantasy                1
LGBTQ Movies                       1
Name: release_year, dtype: int64
In [66]:
netflix_copy.groupby(['Genre 2'])['release_year'].count().sort_values(ascending = False)
Out[66]:
Genre 2
 International Movies            1722
 Dramas                           758
 Independent Movies               576
 International TV Shows           475
 Comedies                         452
 TV Dramas                        320
 TV Comedies                      263
 Romantic TV Shows                239
 Thrillers                        232
 Romantic Movies                  171
 Docuseries                       153
 Music & Musicals                 148
 Korean TV Shows                  131
 Sci-Fi & Fantasy                 112
 Sports Movies                    100
 Reality TV                        95
 TV Action & Adventure             83
 Horror Movies                     75
 Crime TV Shows                    70
 Spanish-Language TV Shows         65
 Kids' TV                          62
 Faith & Spirituality              54
 Anime Features                    50
 Cult Movies                       45
 Science & Nature TV               45
 LGBTQ Movies                      45
 Documentaries                     39
 Children & Family Movies          32
 Classic Movies                    30
 TV Horror                         30
 TV Mysteries                      22
 TV Sci-Fi & Fantasy               21
 Teen TV Shows                     21
 Stand-Up Comedy & Talk Shows      16
 TV Thrillers                      11
 Stand-Up Comedy                    9
 Classic & Cult TV                  6
Name: release_year, dtype: int64
In [67]:
netflix_copy.groupby(['Genre 3'])['release_year'].count().sort_values(ascending = False)
Out[67]:
Genre 3
 International Movies            902
 Romantic Movies                 442
 TV Dramas                       375
 Thrillers                       280
 Music & Musicals                209
 TV Comedies                     191
 Independent Movies              160
 Sports Movies                   118
 Sci-Fi & Fantasy                118
 Spanish-Language TV Shows       106
 International TV Shows          101
 Romantic TV Shows                99
 TV Mysteries                     76
 Dramas                           69
 TV Sci-Fi & Fantasy              61
 LGBTQ Movies                     56
 Teen TV Shows                    48
 Science & Nature TV              47
 TV Thrillers                     46
 TV Action & Adventure            45
 Reality TV                       40
 TV Horror                        34
 Docuseries                       21
 Korean TV Shows                  20
 Cult Movies                      14
 Comedies                         12
 Faith & Spirituality             11
 Horror Movies                     7
 Classic Movies                    6
 Stand-Up Comedy & Talk Shows      6
 Children & Family Movies          4
 Kids' TV                          1
 Documentaries                     1
Name: release_year, dtype: int64

5. Best Month for releasing content?¶

In [68]:
netflix_copy.head(2)
Out[68]:
show_id type title director cast country date_added release_year rating duration description Genre 1 Genre 2 Genre 3
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson Unknown United States September 25, 2021 2020 PG-13 90 min As her father nears the end of his life, filmm... Documentaries NaN NaN
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 Seasons After crossing paths at a party, a Cape Town t... International TV Shows TV Dramas TV Mysteries
In [102]:
netflix_copy.dtypes
Out[102]:
show_id                     object
type                        object
title                       object
director                    object
cast                        object
country                     object
date_added          datetime64[ns]
release_year                 int64
rating                      object
duration                    object
description                 object
Genre 1                     object
Genre 2                     object
Genre 3                     object
month_added                  int32
month_name_added            object
year_added                   int32
dtype: object
In [104]:
netflix_tv = netflix_copy[netflix_copy["type"] == "TV Show"]
netflix_movies = netflix_copy[netflix_copy["type"] == "Movie"]
In [114]:
netflix_copy["date_added"] = pd.to_datetime(netflix_copy['date_added'],format='mixed')
netflix_copy['month_added']=netflix_copy['date_added'].dt.month
netflix_copy['month_name_added']=netflix_copy['date_added'].dt.month_name()
netflix_copy['year_added'] = netflix_copy['date_added'].dt.year
In [116]:
netflix_copy.head(2)
Out[116]:
show_id type title director cast country date_added release_year rating duration description Genre 1 Genre 2 Genre 3 month_added month_name_added year_added release_after_years
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson Unknown United States 2021-09-25 2020 PG-13 90 min As her father nears the end of his life, filmm... Documentaries NaN NaN 9 September 2021 1
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa 2021-09-24 2021 TV-MA 2 Seasons After crossing paths at a party, a Cape Town t... International TV Shows TV Dramas TV Mysteries 9 September 2021 0
In [117]:
netflix_copy.month_name_added.value_counts().to_frame('Value_count')
Out[117]:
Value_count
month_name_added
July 827
December 812
September 769
April 763
October 760
August 754
March 741
January 737
June 728
November 705
May 632
February 562
In [ ]:
 
In [119]:
sns.countplot(x=netflix_copy['month_name_added'],orient='v')
plt.xticks(rotation=90)
Out[119]:
(array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11]),
 [Text(0, 0, 'September'),
  Text(1, 0, 'August'),
  Text(2, 0, 'July'),
  Text(3, 0, 'June'),
  Text(4, 0, 'May'),
  Text(5, 0, 'April'),
  Text(6, 0, 'March'),
  Text(7, 0, 'February'),
  Text(8, 0, 'January'),
  Text(9, 0, 'December'),
  Text(10, 0, 'November'),
  Text(11, 0, 'October')])
In [106]:
netflix_content = netflix_copy[['month_added','month_name_added']].value_counts().reset_index().rename(columns = {
    0 : 'count'}).sort_values('month_added').drop('month_added',axis=1)
netflix_content['percent'] = netflix_content['count'].apply(lambda x : 100*x/sum(netflix_content['count']))


netflix_tv2 = netflix_tv[['month_added','month_name_added']].value_counts().reset_index().rename(columns = {
    0 : 'count'}).sort_values('month_added').drop('month_added',axis=1)
netflix_tv2['percent'] = netflix_tv2['count'].apply(lambda x : 100*x/sum(netflix_tv2['count']))


netflix_movies2 = netflix_movies[['month_added','month_name_added']].value_counts().reset_index().rename(columns = {
    0 : 'count'}).sort_values('month_added').drop('month_added',axis=1)
netflix_movies2['percent'] = netflix_movies2['count'].apply(lambda x : 100*x/sum(netflix_movies2['count']))

t1 = go.Scatter(x=netflix_movies2['month_name_added'], y=netflix_movies2["count"], name="Movies", marker=dict(color="#a678de"))
t2 = go.Scatter(x=netflix_tv2['month_name_added'], y=netflix_tv2["count"], name="TV Shows", marker=dict(color="#6ad49b"))
t3 = go.Scatter(x=netflix_content['month_name_added'], y=netflix_content["count"], name="Total Contents", marker=dict(color="Brown"))


data = [t1, t2, t3]

layout = go.Layout(title="Content added over the years", legend=dict(x=0.1, y=1.1, orientation="h"))
fig = go.Figure(data, layout=layout)
fig.show()

Observation :

  • July has maximum numbers of movies release. Hence July is the best month for releasing content.
  • The growth in contents are higher in the first three months and the last three months of the year.
  • Least number of contents are added in the month of February.

6. Highest watched genres on Netflix?¶

In [69]:
netflix_copy.head(2)
Out[69]:
show_id type title director cast country date_added release_year rating duration description Genre 1 Genre 2 Genre 3
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson Unknown United States September 25, 2021 2020 PG-13 90 min As her father nears the end of his life, filmm... Documentaries NaN NaN
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 Seasons After crossing paths at a party, a Cape Town t... International TV Shows TV Dramas TV Mysteries
In [70]:
netflix_copy['Genre 1'].describe(include=all)
Out[70]:
count       8790
unique        36
top       Dramas
freq        1599
Name: Genre 1, dtype: object
In [71]:
netflix_copy['Genre 2'].describe(include=all)
Out[71]:
count                      6778
unique                       37
top        International Movies
freq                       1722
Name: Genre 2, dtype: object
In [72]:
netflix_copy['Genre 3'].describe(include=all)
Out[72]:
count                      3726
unique                       33
top        International Movies
freq                        902
Name: Genre 3, dtype: object
In [113]:
# Showing most watched genre on Pie Chart
genre_types = ['Genre 1','Genre 2','Genre 3']

Value_count = [8790,6778,3726]
plt.pie(Value_count, labels = genre_types, autopct="%2.2f%%")
plt.legend(title='Most watched genre on the Netflix')
plt.show()
  • Obeservation: Above Pi-chart Shows that Genre1 has watched maximum times.

7. Checking the time it took for movies to appear on netflix after release?¶

In [107]:
netflix_copy.head(2)
Out[107]:
show_id type title director cast country date_added release_year rating duration description Genre 1 Genre 2 Genre 3 month_added month_name_added year_added
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson Unknown United States 2021-09-25 2020 PG-13 90 min As her father nears the end of his life, filmm... Documentaries NaN NaN 9 September 2021
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa 2021-09-24 2021 TV-MA 2 Seasons After crossing paths at a party, a Cape Town t... International TV Shows TV Dramas TV Mysteries 9 September 2021
In [108]:
netflix_copy[['release_year','year_added']]
Out[108]:
release_year year_added
0 2020 2021
1 2021 2021
2 2021 2021
3 2021 2021
4 2021 2021
... ... ...
8802 2007 2019
8803 2018 2019
8804 2009 2019
8805 2006 2020
8806 2015 2019

8790 rows × 2 columns

In [110]:
netflix_copy['release_after_years'] = netflix_copy.year_added - netflix_copy.release_year
In [112]:
#Showing displot chart for time it took for movies to get publish on netflix after release
sns.displot(netflix_copy, x="release_after_years", binwidth=5)
Out[112]:
<seaborn.axisgrid.FacetGrid at 0x170119baf80>

8 Show id and director for 'Sex Education'?¶

In [75]:
netflix_copy.head(2)
Out[75]:
show_id type title director cast country date_added release_year rating duration description Genre 1 Genre 2 Genre 3
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson Unknown United States September 25, 2021 2020 PG-13 90 min As her father nears the end of his life, filmm... Documentaries NaN NaN
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 Seasons After crossing paths at a party, a Cape Town t... International TV Shows TV Dramas TV Mysteries
In [76]:
netflix_copy[netflix_copy['title'].isin(['Sex Education'])]
Out[76]:
show_id type title director cast country date_added release_year rating duration description Genre 1 Genre 2 Genre 3
32 s33 TV Show Sex Education Unknown Asa Butterfield, Gillian Anderson, Ncuti Gatwa... United Kingdom September 17, 2021 2020 TV-MA 3 Seasons Insecure Otis has all the answers when it come... British TV Shows International TV Shows TV Comedies

Obeservation:

  • For "Sex Education" the show id is s33 and No director.

9. All the movies that were released in year 2004?¶

In [77]:
netflix_copy.head(2)
Out[77]:
show_id type title director cast country date_added release_year rating duration description Genre 1 Genre 2 Genre 3
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson Unknown United States September 25, 2021 2020 PG-13 90 min As her father nears the end of his life, filmm... Documentaries NaN NaN
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 Seasons After crossing paths at a party, a Cape Town t... International TV Shows TV Dramas TV Mysteries
In [78]:
netflix[(netflix['type'] == 'Movie' ) & (netflix['release_year'] == 2004)]
Out[78]:
show_id type title director cast country date_added release_year rating duration listed_in description
53 s54 Movie InuYasha the Movie 4: Fire on the Mystic Island Toshiya Shinohara Kappei Yamaguchi, Satsuki Yukino, Koji Tsujita... Japan September 15, 2021 2004 TV-PG 88 min Action & Adventure, Anime Features, Internatio... Ai, a young half-demon who has escaped from Ho...
63 s64 Movie Naruto the Movie: Ninja Clash in the Land of Snow Tensai Okamura Junko Takeuchi, Noriaki Sugiyama, Chie Nakamur... Japan September 15, 2021 2004 TV-PG 83 min Action & Adventure, Anime Features, Internatio... Naruto, Sasuke and Sakura learn they'll be pro...
127 s128 Movie A Cinderella Story Mark Rosman Hilary Duff, Chad Michael Murray, Jennifer Coo... United States, Canada September 1, 2021 2004 PG 95 min Children & Family Movies, Comedies Teen Sam meets the boy of her dreams at a danc...
200 s201 Movie Krishna Cottage Santram Varma Sohail Khan, Isha Koppikar, Natassha, Rati Agn... India August 27, 2021 2004 TV-14 124 min Action & Adventure, Horror Movies, Internation... True love is put to the test when another woma...
351 s352 Movie Team America: World Police Trey Parker Trey Parker, Matt Stone, Kristen Miller, Masas... United States, Germany August 1, 2021 2004 R 98 min Action & Adventure, Comedies, Cult Movies In this musical satire, an all-marionette poli...
357 s358 Movie The Machinist Brad Anderson Christian Bale, Jennifer Jason Leigh, Aitana S... Spain, France, United Kingdom, United States August 1, 2021 2004 R 102 min Dramas, Independent Movies, Thrillers Haunted and gaunt after a prolonged bout of in...
652 s653 Movie Osuofia in London II Kingsley Ogoro Nkem Owoh, Mara Derwent, Francis Odega, Cynthi... NaN June 22, 2021 2004 TV-14 70 min Comedies, Dramas, International Movies After collecting his brother's inheritance, Os...
799 s800 Movie Million Dollar Baby Clint Eastwood Clint Eastwood, Hilary Swank, Morgan Freeman, ... United States June 2, 2021 2004 PG-13 133 min Dramas, Sports Movies When a cantankerous trainer mentors a persiste...
809 s810 Movie Starsky & Hutch Todd Phillips Ben Stiller, Owen Wilson, Vince Vaughn, Juliet... United States June 2, 2021 2004 PG-13 101 min Action & Adventure, Comedies New undercover cop partners Starsky and Hutch ...
891 s892 Movie Layer Cake Matthew Vaughn Daniel Craig, Colm Meaney, Kenneth Cranham, Si... United Kingdom May 13, 2021 2004 R 105 min Independent Movies, International Movies, Thri... A suave, steely-eyed London cocaine dealer's r...
981 s982 Movie G.O.R.A Ömer Faruk Sorak Cem Yılmaz, Rasim Öztekin, Özkan Uğur, İdil Fı... Turkey April 23, 2021 2004 TV-MA 123 min Action & Adventure, Comedies, International Mo... Carpet dealer and UFO photo forger Arif is abd...
1020 s1021 Movie Madness in the Desert Satyajit Bhatkal Aamir Khan, Ashutosh Gowariker India April 17, 2021 2004 TV-14 141 min Documentaries, International Movies The story of making "Lagaan," one of the mille...
1521 s1522 Movie Rabun Yasmin Ahmad M. Rajoli, Kartina Aziz, Rozie Rashid, Irwan I... Malaysia December 18, 2020 2004 TV-PG 85 min Dramas, Independent Movies, International Movies A free-spirited couple leave the city to retir...
1673 s1674 Movie Black Friday Anurag Kashyap Pavan Malhotra, Kay Kay Menon, Aditya Srivasta... India November 19, 2020 2004 TV-MA 162 min Dramas, International Movies This docudrama based on the same-titled book t...
1858 s1859 Movie Fida Ken Ghosh Fardeen Khan, Kareena Kapoor, Shahid Kapoor, K... India October 13, 2020 2004 TV-14 117 min International Movies, Romantic Movies, Thrillers An all-around nice guy finds himself in a dang...
1876 s1877 Movie Palermo Hollywood Eduardo Pinto Brian Maya, Matías Desiderio, Manuela Pal, Azu... Argentina October 8, 2020 2004 TV-MA 106 min Dramas, International Movies A pair of petty criminals from different backg...
2439 s2440 Movie The Student Cop Wael Ihsan Karim Abdel Aziz, Hassan Hosny, Ghada Adel, Ma... Egypt June 2, 2020 2004 TV-14 111 min Action & Adventure, Comedies, International Mo... Sent undercover to investigate suspicious acti...
2510 s2511 Movie The Beach Loafer Ali Ragab Ahmed Helmy, Yasmin Abdulaziz, Mahmoud Abdel M... Egypt May 19, 2020 2004 TV-14 112 min Comedies, International Movies A wedding singer and his friends try to prove ...
3002 s3003 Movie Whisky Pablo Stoll, Juan Pablo Rebella Andrés Pazos, Mirella Pascual, Jorge Bolani, J... Uruguay, Argentina, Germany, Spain January 22, 2020 2004 TV-MA 98 min Comedies, Dramas, International Movies To impress family, a factory owner pretends to...
3142 s3143 Movie Lakshya Farhan Akhtar Amitabh Bachchan, Hrithik Roshan, Preity Zinta... India December 15, 2019 2004 TV-PG 185 min Action & Adventure, Dramas, International Movies After dropping out of the army, a spoiled teen...
3544 s3545 Movie Spookley the Square Pumpkin Bernie Denk Sonja Ball, Craig Francis, Rick Jones, Michel ... United States September 1, 2019 2004 G 47 min Children & Family Movies When a storm terrorizes his patch, a pumpkin c...
3649 s3650 Movie The Twins Effect II Corey Yuen, Patrick Leung Donnie Yen, Jaycee Chan, Charlene Choi, Gillia... Hong Kong, China July 21, 2019 2004 TV-14 106 min Action & Adventure, Comedies, International Mo... An empress rules over a land where men are sub...
4102 s4103 Movie Chameli Sudhir Mishra Kareena Kapoor, Rahul Bose, Rinke Khanna, Yash... India February 15, 2019 2004 TV-14 102 min Dramas, International Movies While taking shelter from a Mumbai monsoon, an...
4952 s4953 Movie Main Hoon Na Farah Khan Shah Rukh Khan, Sunil Shetty, Sushmita Sen, Za... India April 1, 2018 2004 TV-14 171 min Action & Adventure, Comedies, Dramas Major Ram Prasad Sharma yearns to see project ...
5014 s5015 Movie Swades Ashutosh Gowariker Shah Rukh Khan, Gayatri Joshi, Kishori Balal, ... India March 1, 2018 2004 TV-PG 185 min Dramas, International Movies An Americanized NASA scientist returns to his ...
5019 s5020 Movie Trailer Park Boys: Xmas Special Mike Clattenburg John Paul Tremblay, Robb Wells, John Dunsworth... Canada March 1, 2018 2004 TV-MA 46 min Movies See what Sunnyvale Trailer Park was like back ...
5021 s5022 Movie Yuva Mani Ratnam Ajay Devgn, Abhishek Bachchan, Vivek Oberoi, E... India March 1, 2018 2004 TV-14 160 min Dramas, International Movies An accident on a bridge ties together three yo...
6018 s6019 Movie 50 First Dates Peter Segal Adam Sandler, Drew Barrymore, Rob Schneider, S... United States December 1, 2020 2004 PG-13 99 min Comedies, Romantic Movies After falling for a pretty art teacher who has...
6107 s6108 Movie Aitraaz Abbas Alibhai Burmawalla, Mastan Alibhai Burma... Akshay Kumar, Kareena Kapoor, Priyanka Chopra,... India March 1, 2018 2004 TV-14 153 min International Movies, Music & Musicals, Romant... A happily married business executive is forced...
6222 s6223 Movie Balto 3: Wings of Change Phil Weinstein Maurice LaMarche, Sean Astin, Keith Carradine,... United States April 1, 2018 2004 G 78 min Children & Family Movies A pilot challenges Balto's son Kodi and his sl...
6283 s6284 Movie Benji: Off the Leash Joe Camp Nick Whitaker, Chris Kendrick, Randall Newsome... United States March 6, 2018 2004 PG 100 min Children & Family Movies, Dramas Benji is back in this charming story that's to...
6480 s6481 Movie Christmas with the Kranks Joe Roth Tim Allen, Jamie Lee Curtis, Dan Aykroyd, Erik... United States January 1, 2019 2004 PG 99 min Children & Family Movies, Comedies When Luther Krank and his wife opt to skip Chr...
6540 s6541 Movie Crash Paul Haggis Sandra Bullock, Don Cheadle, Matt Dillon, Jenn... United States, Germany October 1, 2019 2004 R 112 min Dramas, Independent Movies In post-Sept. 11 Los Angeles, tensions erupt w...
6602 s6603 Movie Devrai Sumitra Bhave, Sunil Sukthankar Atul Kulkarni, Sonali Kulkarni, Tushar Dalvi, ... India January 1, 2018 2004 TV-PG 123 min Dramas, International Movies After science student Shesh Shahi – a shy ecce...
6669 s6670 Movie Ek Hasina Thi Sriram Raghavan Saif Ali Khan, Urmila Matondkar, Seema Biswas,... India August 1, 2019 2004 TV-MA 134 min Dramas, International Movies, Thrillers Imprisoned for underworld crimes she didn’t co...
6928 s6929 Movie Harold & Kumar Go to White Castle Danny Leiner John Cho, Kal Penn, Paula Garcés, Neil Patrick... United States, Canada, Germany January 1, 2020 2004 R 88 min Comedies, Cult Movies Buddies Harold and Kumar set out to satisfy a ...
6957 s6958 Movie Hellboy Guillermo del Toro Ron Perlman, John Hurt, Selma Blair, Rupert Ev... United States December 1, 2018 2004 PG-13 122 min Action & Adventure, Cult Movies, Sci-Fi & Fantasy This fast-paced action flick tells the dark st...
7088 s7089 Movie Inuyasha the Movie - L'isola del fuoco scarlatto Toshiya Shinohara Kappei Yamaguchi, Satsuki Yukino, Koji Tsujita... Japan September 1, 2017 2004 TV-PG 88 min Action & Adventure, Anime Features, Internatio... Ai, a young half-demon who has escaped from Ho...
7198 s7199 Movie Kill Bill: Vol. 2 Quentin Tarantino Uma Thurman, David Carradine, Michael Madsen, ... United States January 1, 2020 2004 R 137 min Action & Adventure The Bride has three left on her rampage list: ...
7239 s7240 Movie Kung Fu Hustle Stephen Chow Stephen Chow, Yuen Wah, Yuen Qiu, Lam Chi-chun... Hong Kong, China, United States April 1, 2020 2004 R 99 min Action & Adventure, Comedies, Cult Movies Sing, a mobster in 1940s China, longs to be as...
7249 s7250 Movie Kyun! Ho Gaya Na Samir Karnik Aishwarya Rai Bachchan, Vivek Oberoi, Amitabh ... India March 1, 2018 2004 TV-PG 165 min International Movies, Romantic Movies Cinematic lovebirds Aishwarya Rai and Vivek Ob...
7460 s7461 Movie Miracle Gavin O'Connor Kurt Russell, Patricia Clarkson, Noah Emmerich... Canada, United States June 1, 2018 2004 PG 136 min Children & Family Movies, Dramas, Sports Movies U.S. hockey coach Herb Brooks unites a motley ...
7524 s7525 Movie Mujhse Shaadi Karogi David Dhawan Rajpal Yadav, Amrish Puri, Kader Khan, Shashi ... India December 31, 2019 2004 TV-PG 158 min Comedies, International Movies, Romantic Movies Samir must overcome a hostile horoscope, a hot...
7564 s7565 Movie National Treasure Jon Turteltaub Nicolas Cage, Diane Kruger, Justin Bartha, Sea... United States June 1, 2018 2004 PG 131 min Action & Adventure, Children & Family Movies Modern treasure hunters search for a chest of ...
7579 s7580 Movie New York Minute Dennie Gordon Mary-Kate Olsen, Ashley Olsen, Eugene Levy, An... United States January 1, 2020 2004 PG 91 min Children & Family Movies, Comedies When bickering teenage twins accidentally land...
7639 s7640 Movie Ocean's Twelve Steven Soderbergh George Clooney, Brad Pitt, Matt Damon, Catheri... United States October 1, 2019 2004 PG-13 125 min Action & Adventure, Comedies Danny Ocean reunites with his old flame and th...
7902 s7903 Movie Run Jeeva Abhishek Bachchan, Bhoomika Chawla, Mahesh Man... India March 1, 2018 2004 TV-14 134 min Action & Adventure, International Movies, Musi... Siddharth falls in love with beautiful Jhanvi....
8013 s8014 Movie Shutter Banjong Pisanthanakun, Parkpoom Wongpoom Ananda Everingham, Natthaweeranuch Thongmee, A... Thailand September 5, 2018 2004 TV-MA 96 min Horror Movies, International Movies After killing a young girl in a hit-and-run ac...
8037 s8038 Movie Sleepover Joe Nussbaum Alexa PenaVega, Mika Boorem, Jane Lynch, Sam H... United States March 1, 2020 2004 PG 89 min Comedies, Romantic Movies As high school approaches, four best friends h...
8452 s8453 Movie The Phantom of the Opera Joel Schumacher Gerard Butler, Emmy Rossum, Patrick Wilson, Mi... United Kingdom, United States June 1, 2019 2004 PG-13 141 min Dramas, Music & Musicals, Romantic Movies In 1870, a disfigured recluse roams beneath a ...
8461 s8462 Movie The Polar Express Robert Zemeckis Tom Hanks, Leslie Zemeckis, Eddie Deezen, Nona... United States January 1, 2021 2004 G 100 min Children & Family Movies In this warm-hearted tale, a young boy's faith...
8463 s8464 Movie The President's Barber Chan-sang Lim Kang-ho Song, So-ri Moon, Jae-eung Lee, Yeong-... South Korea October 1, 2017 2004 TV-MA 116 min Comedies, Dramas, International Movies The personal barber to the president, as well ...
8465 s8466 Movie The Prince & Me Martha Coolidge Julia Stiles, Luke Mably, Ben Miller, Miranda ... United States, Czech Republic October 1, 2020 2004 PG 111 min Comedies, Romantic Movies A hardworking Wisconsin college student falls ...
8624 s8625 Movie Tremors 4: The Legend Begins S.S. Wilson Michael Gross, Sara Botsford, Billy Drago, Bre... United States January 1, 2020 2004 PG-13 101 min Comedies, Horror Movies, Sci-Fi & Fantasy Residents of a abandoned mining town attempt t...
8682 s8683 Movie Vizontele Tuuba Yılmaz Erdoğan Yılmaz Erdoğan, Tarık Akan, Altan Erkekli, Cez... Turkey March 10, 2017 2004 NR 106 min Comedies, Dramas, International Movies With civil war looming, a TV-obsessed Turkish ...
In [79]:
netflix[(netflix['type'] == 'Movie' ) & (netflix['release_year'] == 2004)].shape
Out[79]:
(55, 12)
Obeservation :¶
  • There are 55 movies released in year 2004.

10. Only the title of all TV shows that were released in United States only.¶

In [80]:
netflix_copy.head(2)
Out[80]:
show_id type title director cast country date_added release_year rating duration description Genre 1 Genre 2 Genre 3
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson Unknown United States September 25, 2021 2020 PG-13 90 min As her father nears the end of his life, filmm... Documentaries NaN NaN
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 Seasons After crossing paths at a party, a Cape Town t... International TV Shows TV Dramas TV Mysteries
In [81]:
netflix_copy[(netflix_copy['type']=='TV Show') & (netflix_copy['country']=='United States')]['title']
Out[81]:
15                           Dear White People
40      He-Man and the Masters of the Universe
55                                   Nailed It
67                           Saved by the Bell
82                                     Lucifer
                         ...                  
8710                                     Weeds
8726                      When Calls the Heart
8747                                 Winsanity
8755                         Women Behind Bars
8780                              Yo-Kai Watch
Name: title, Length: 754, dtype: object
In [82]:
netflix_copy[(netflix_copy['type']=='TV Show') & (netflix_copy['country']=='United States')]['title'].shape
Out[82]:
(754,)

Obeservation:

  • There are 754 TV shows that were released in United States only.

11. How many Movies/TV Shows, 'Salman Khan' was cast??¶

In [83]:
netflix_copy.head(2)
Out[83]:
show_id type title director cast country date_added release_year rating duration description Genre 1 Genre 2 Genre 3
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson Unknown United States September 25, 2021 2020 PG-13 90 min As her father nears the end of his life, filmm... Documentaries NaN NaN
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 Seasons After crossing paths at a party, a Cape Town t... International TV Shows TV Dramas TV Mysteries
In [84]:
netflix_copy[netflix_copy['cast'].str.contains('Salman Khan')]
Out[84]:
show_id type title director cast country date_added release_year rating duration description Genre 1 Genre 2 Genre 3
1441 s1442 Movie Hello Brother Sohail Khan Salman Khan, Arbaaz Khan, Rani Mukerji, Johny ... India January 4, 2021 1999 TV-14 126 min After receiving a heart transplant from a murd... Action & Adventure Comedies International Movies
1674 s1675 Movie Bodyguard Siddique Salman Khan, Kareena Kapoor, Raj Babbar, Asran... India November 19, 2020 2011 TV-14 130 min Irked by her bodyguard, an heiress invents a s... Action & Adventure Comedies International Movies
2339 s2340 Movie Prem Ratan Dhan Payo Sooraj R. Barjatya Salman Khan, Sonam Kapoor, Anupam Kher, Neil N... India June 25, 2020 2015 TV-14 164 min While recovering from an assassination attempt... Action & Adventure Dramas International Movies
2545 s2546 Movie Andaz Apna Apna Rajkumar Santoshi Aamir Khan, Salman Khan, Raveena Tandon, Karis... India May 11, 2020 1994 TV-14 160 min Broke and with no concrete plans for the futur... Action & Adventure Comedies Cult Movies
2734 s2735 Movie Kuch Kuch Hota Hai Karan Johar Shah Rukh Khan, Kajol, Rani Mukerji, Farida Ja... India April 1, 2020 1998 TV-14 185 min Per her mother’s last wish, a girl sets out to... Comedies Dramas International Movies
2756 s2757 Movie Paharganj Rakesh Ranjan Kumar Lorena Franco, Bijesh Jayarajan, Neet Chowdhar... India March 31, 2020 2019 TV-MA 107 min In the underbelly of a Delhi neighborhood, a w... Dramas Independent Movies International Movies
2957 s2958 Movie Hum Aapke Hain Koun Sooraj R. Barjatya Madhuri Dixit, Salman Khan, Mohnish Bahl, Renu... India February 1, 2020 1994 TV-14 193 min Although Nisha falls for Prem, she agrees to m... Classic Movies Dramas International Movies
2969 s2970 Movie Together For Eternity Sooraj R. Barjatya Salman Khan, Karisma Kapoor, Saif Ali Khan, Ta... India February 1, 2020 1999 TV-G 176 min A scheming matriarch plots to cut off her disa... Dramas International Movies Music & Musicals
4729 s4730 Movie Main aurr Mrs. Khanna Prem Soni Salman Khan, Kareena Kapoor, Sohail Khan, Prei... India August 2, 2018 2009 TV-14 109 min A financially troubled Indian man heads to Sin... International Movies Music & Musicals Romantic Movies
5718 s5719 Movie Mumbai Cha Raja Manjeet Singh Rahul Bairagi, Arbaaz Khan, Tejas Parvatkar, D... India November 15, 2016 2012 TV-MA 77 min This coming-of-age tale follows Rahul, a young... Dramas Independent Movies International Movies
6440 s6441 Movie Chal Mere Bhai David Dhawan Sanjay Dutt, Salman Khan, Karisma Kapoor, Dali... India December 31, 2019 2000 TV-14 132 min When a secretary saves her tycoon boss's life,... Comedies International Movies Romantic Movies
7022 s7023 Movie Hum Saath-Saath Hain Sooraj R. Barjatya Salman Khan, Karisma Kapoor, Saif Ali Khan, Ta... India January 1, 2018 1999 TV-G 176 min A scheming matriarch plots to cut off her disa... Dramas International Movies Music & Musicals
7109 s7110 Movie Jaan-E-Mann: Let's Fall in Love... Again Shirish Kunder Salman Khan, Akshay Kumar, Preity Zinta, Anupa... India December 31, 2019 2006 TV-14 163 min To avoid alimony payments, an aspiring actor s... Dramas International Movies Romantic Movies
7144 s7145 Movie Judwaa David Dhawan Salman Khan, Karisma Kapoor, Rambha, Kader Kha... India December 31, 2019 1997 TV-14 133 min Separated at birth, a pair of identical twins ... Comedies International Movies Romantic Movies
7360 s7361 Movie Lucky: No Time for Love Radhika Rao, Vinay Sapru Salman Khan, Sneha Ullal, Mithun Chakraborty, ... India November 15, 2017 2005 TV-14 131 min During an uprising in Russia's St. Petersburg,... Dramas International Movies Romantic Movies
7386 s7387 Movie Maine Pyaar Kyun Kiya David Dhawan Salman Khan, Sushmita Sen, Sohail Khan, Katrin... India December 31, 2019 2005 TV-14 137 min After lying to his girlfriend, orthopedic surg... Comedies International Movies Music & Musicals
7387 s7388 Movie Maine Pyar Kiya Sooraj R. Barjatya Salman Khan, Bhagyashree, Alok Nath, Rajeev Ve... India January 1, 2018 1989 TV-PG 192 min When the son of a wealthy businessman and the ... Dramas International Movies Music & Musicals
7524 s7525 Movie Mujhse Shaadi Karogi David Dhawan Rajpal Yadav, Amrish Puri, Kader Khan, Shashi ... India December 31, 2019 2004 TV-PG 158 min Samir must overcome a hostile horoscope, a hot... Comedies International Movies Romantic Movies
7590 s7591 Movie No Entry Anees Bazmee Anil Kapoor, Salman Khan, Fardeen Khan, Bipash... India March 1, 2018 2005 TV-PG 161 min After a prank goes sideways, three buddies fin... Comedies International Movies NaN
7837 s7838 Movie Ready Anees Bazmee Salman Khan, Asin, Paresh Rawal, Mahesh Manjre... India October 22, 2017 2011 TV-PG 144 min Bollywood superstar Salman Khan plays Prem, an... Comedies International Movies Romantic Movies
In [85]:
netflix_copy[netflix_copy['cast'].str.contains('Salman Khan')].shape
Out[85]:
(20, 14)

Obeservation:

  • There are 20 movies where case is Salman Khan.

12. How many movies got the "TV-14" rating in the India??¶

In [86]:
netflix_copy.head(2)
Out[86]:
show_id type title director cast country date_added release_year rating duration description Genre 1 Genre 2 Genre 3
0 s1 Movie Dick Johnson Is Dead Kirsten Johnson Unknown United States September 25, 2021 2020 PG-13 90 min As her father nears the end of his life, filmm... Documentaries NaN NaN
1 s2 TV Show Blood & Water Unknown Ama Qamata, Khosi Ngema, Gail Mabalane, Thaban... South Africa September 24, 2021 2021 TV-MA 2 Seasons After crossing paths at a party, a Cape Town t... International TV Shows TV Dramas TV Mysteries
In [87]:
netflix_copy[(netflix_copy['type']=='Movie') & (netflix_copy['country']=='India') & (netflix_copy['rating']=='TV-14')]
Out[87]:
show_id type title director cast country date_added release_year rating duration description Genre 1 Genre 2 Genre 3
24 s25 Movie Jeans S. Shankar Prashanth, Aishwarya Rai Bachchan, Sri Lakshmi... India September 21, 2021 1998 TV-14 166 min When the father of the man she loves insists t... Comedies International Movies Romantic Movies
105 s106 Movie Angamaly Diaries Lijo Jose Pellissery Antony Varghese, Reshma Rajan, Binny Rinky Ben... India September 5, 2021 2017 TV-14 128 min After growing up amidst the gang wars of his h... Action & Adventure Comedies Dramas
114 s115 Movie Anjaam Rahul Rawail Madhuri Dixit, Shah Rukh Khan, Tinnu Anand, Jo... India September 2, 2021 1994 TV-14 143 min A wealthy industrialist’s dangerous obsession ... Dramas International Movies Thrillers
118 s119 Movie Gurgaon Shanker Raman Akshay Oberoi, Pankaj Tripathi, Ragini Khanna,... India September 2, 2021 2017 TV-14 106 min When the daughter of a wealthy family returns ... Dramas International Movies Thrillers
126 s127 Movie Shikara Vidhu Vinod Chopra Aadil Khan, Sadia Khateeb, Zain Khan Durrani, ... India September 2, 2021 2020 TV-14 115 min A couple must strive to remain resilient after... Dramas International Movies Romantic Movies
... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
8770 s8771 Movie Yaadein Subhash Ghai Jackie Shroff, Hrithik Roshan, Kareena Kapoor,... India March 1, 2018 2001 TV-14 171 min Two young lovers set out to overcome the obsta... Dramas International Movies Romantic Movies
8771 s8772 Movie Yaara O Dildaara Ksshitij Chaudhary Harbhajan Mann, Tulip Joshi, Kabir Bedi, Gulza... India November 1, 2017 2011 TV-14 132 min The patriarch of a wealthy family with one ind... Dramas International Movies Music & Musicals
8772 s8773 Movie Yamla Pagla Deewana 2 Sangeeth Sivan Dharmendra, Sunny Deol, Bobby Deol, Neha Sharm... India May 1, 2017 2013 TV-14 147 min Up to his old tricks, con man Dharam poses as ... Action & Adventure Comedies International Movies
8799 s8800 Movie Zenda Avadhoot Gupte Santosh Juvekar, Siddharth Chandekar, Sachit P... India February 15, 2018 2009 TV-14 120 min A change in the leadership of a political part... Dramas International Movies NaN
8806 s8807 Movie Zubaan Mozez Singh Vicky Kaushal, Sarah-Jane Dias, Raaghav Chanan... India March 2, 2019 2015 TV-14 111 min A scrappy but poor boy worms his way into a ty... Dramas International Movies Music & Musicals

526 rows × 14 columns

In [89]:
netflix_copy[(netflix_copy['type']=='Movie') & (netflix_copy['country']=='India') & (netflix_copy['rating']=='TV-14')].shape
Out[89]:
(526, 14)

Observation:

  • 526 movies got the "TV-14" rating in India.

Business Insights :¶

  1. We can see that netflix have 69% movies while 30% TV Shows

  2. Maximum count of ratings included TV-MA (Mature Audiences) and TV-14 (Parents strongly cautioned) for both Movies and TV shows

17 types of ratings on netflix

  1. Netflix touched its peak for making movies in 2018 and TV shows in 2020

From the above we can see that with passing years more movies are being made year by year The above data shows that there is a sudden increase in the creation of movies in year 2016 as compared to year 2015

  1. Audience likes to watched mostly movies(96.88% ) over TV shows(3.12%)

  2. July has maximum numbers of movies release. Hence July is the best month for releasing content.

The growth in contents are higher in the first three months and the last three months of the year. Least number of contents are added in the month of February.

  1. Genre1 has been watched maximum times.

  2. For "Sex Education" the show id is s33 and No director.

  3. There are 55 movies released in year 2004.

  4. There are 754 TV shows that were released in United States only.

  5. There are 20 movies where case is Salman Khan.

  6. 526 movies got the "TV-14" rating in India.

Recommendations :¶

  1. Considering that Netflix has a higher focus on movies than TV shows, it could be beneficial for Netflix to continue investing in movie production. This can involve acquiring more movie titles, producing original movies, and partnering with renowned filmmakers and production companies to strengthen their movie catalog.

  2. Given that TV-MA and TV-14 ratings are popular among Netflix viewers, it would be advantageous for Netflix to continue offering a diverse range of content targeted towards mature audiences. This can involve acquiring or producing more content in these rating categories to cater to the preferences of their subscribers.

  3. Netflix can capitalize on the increasing trend of movie production by actively scouting for new and engaging movie projects. This can involve collaborations with talented directors, screenwriters, and actors to create high-quality movies that resonate with global audiences.

  4. While movies are more popular among the audience, Netflix should not neglect TV shows entirely. They can consider strategic investments in original TV show productions to cater to the segment of their subscribers who enjoy TV series. This can involve partnering with popular showrunners and creators to develop compelling and binge-worthy TV content.

  5. Based on the data showing the higher number of movie releases in July and the growth pattern in content additions, Netflix can prioritize the release of major movies and content expansions during the first three months and the last three months of the year. This can help maximize viewership and subscriber engagement during these periods.

  6. Netflix can analyze the data further to identify the most-watched genres (Genre1) and leverage this information to curate personalized recommendations for their subscribers. By understanding the viewing preferences of their audience, Netflix can enhance the user experience by suggesting relevant content from the popular genres.

  7. It would be beneficial for Netflix to provide complete and accurate metadata for all their content, including the show "Sex Education." Having accurate show IDs and director information helps improve the overall browsing experience for users and ensures consistent and comprehensive content information.

  8. Considering the number of movies released in 2004 (55), Netflix can explore highlighting classic and noteworthy movies from that year to attract cinephiles and those interested in retro content. Creating curated collections or featuring a "Throwback" category can engage viewers who appreciate films from specific years or eras.

  9. With a significant number of TV shows released exclusively in the United States, Netflix can continue investing in regional content production and acquisitions. By catering to specific markets, they can attract and retain subscribers in the United States and strengthen their position in the local streaming landscape.

  10. The presence of movies featuring Salman Khan indicates an existing fan base for the actor. Netflix can leverage this popularity by promoting and marketing these movies prominently, targeting Salman Khan's fans, and exploring collaborations for exclusive content featuring the actor.

  11. Given the high number of movies with a "TV-14" rating in India, Netflix can further expand its content library catering to Indian viewers. By acquiring or producing more content that aligns with Indian tastes and preferences, Netflix can strengthen its position in the Indian market and attract a larger audience.

These recommendations are based on the insights provided, and it's important for Netflix to conduct in-depth market research and analysis to validate and refine these recommendations further.

Thank YOU !!¶